Optimal. Leaf size=239 \[ -\frac {\left (a^4-12 a^2 b^2+15 b^4\right ) \cos (c+d x)}{a^7 d}-\frac {b \left (3 a^2-5 b^2\right ) \cos ^2(c+d x)}{a^6 d}+\frac {2 \left (a^2-3 b^2\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {3 b \cos ^4(c+d x)}{4 a^4 d}-\frac {\cos ^5(c+d x)}{5 a^3 d}-\frac {b^3 \left (a^2-b^2\right )^2}{2 a^8 d (b+a \cos (c+d x))^2}+\frac {b^2 \left (3 a^4-10 a^2 b^2+7 b^4\right )}{a^8 d (b+a \cos (c+d x))}+\frac {b \left (3 a^4-20 a^2 b^2+21 b^4\right ) \log (b+a \cos (c+d x))}{a^8 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 239, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3957, 2916, 12,
962} \begin {gather*} \frac {3 b \cos ^4(c+d x)}{4 a^4 d}-\frac {\cos ^5(c+d x)}{5 a^3 d}-\frac {b^3 \left (a^2-b^2\right )^2}{2 a^8 d (a \cos (c+d x)+b)^2}-\frac {b \left (3 a^2-5 b^2\right ) \cos ^2(c+d x)}{a^6 d}+\frac {2 \left (a^2-3 b^2\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {b^2 \left (3 a^4-10 a^2 b^2+7 b^4\right )}{a^8 d (a \cos (c+d x)+b)}+\frac {b \left (3 a^4-20 a^2 b^2+21 b^4\right ) \log (a \cos (c+d x)+b)}{a^8 d}-\frac {\left (a^4-12 a^2 b^2+15 b^4\right ) \cos (c+d x)}{a^7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 962
Rule 2916
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sin ^5(c+d x)}{(a+b \sec (c+d x))^3} \, dx &=-\int \frac {\cos ^3(c+d x) \sin ^5(c+d x)}{(-b-a \cos (c+d x))^3} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x^3 \left (a^2-x^2\right )^2}{a^3 (-b+x)^3} \, dx,x,-a \cos (c+d x)\right )}{a^5 d}\\ &=\frac {\text {Subst}\left (\int \frac {x^3 \left (a^2-x^2\right )^2}{(-b+x)^3} \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=\frac {\text {Subst}\left (\int \left (a^4 \left (1+\frac {3 b^2 \left (-4 a^2+5 b^2\right )}{a^4}\right )-\frac {b^3 \left (-a^2+b^2\right )^2}{(b-x)^3}+\frac {3 a^4 b^2-10 a^2 b^4+7 b^6}{(b-x)^2}+\frac {-3 a^4 b+20 a^2 b^3-21 b^5}{b-x}+2 b \left (-3 a^2+5 b^2\right ) x-2 \left (a^2-3 b^2\right ) x^2+3 b x^3+x^4\right ) \, dx,x,-a \cos (c+d x)\right )}{a^8 d}\\ &=-\frac {\left (a^4-12 a^2 b^2+15 b^4\right ) \cos (c+d x)}{a^7 d}-\frac {b \left (3 a^2-5 b^2\right ) \cos ^2(c+d x)}{a^6 d}+\frac {2 \left (a^2-3 b^2\right ) \cos ^3(c+d x)}{3 a^5 d}+\frac {3 b \cos ^4(c+d x)}{4 a^4 d}-\frac {\cos ^5(c+d x)}{5 a^3 d}-\frac {b^3 \left (a^2-b^2\right )^2}{2 a^8 d (b+a \cos (c+d x))^2}+\frac {b^2 \left (3 a^4-10 a^2 b^2+7 b^4\right )}{a^8 d (b+a \cos (c+d x))}+\frac {b \left (3 a^4-20 a^2 b^2+21 b^4\right ) \log (b+a \cos (c+d x))}{a^8 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.87, size = 388, normalized size = 1.62 \begin {gather*} \frac {-1740 a^6 b+26160 a^4 b^3-46080 a^2 b^5+12480 b^7-206 a^7 \cos (3 (c+d x))+2780 a^5 b^2 \cos (3 (c+d x))-3360 a^3 b^4 \cos (3 (c+d x))-274 a^6 b \cos (4 (c+d x))+420 a^4 b^3 \cos (4 (c+d x))+38 a^7 \cos (5 (c+d x))-84 a^5 b^2 \cos (5 (c+d x))+21 a^6 b \cos (6 (c+d x))-6 a^7 \cos (7 (c+d x))+2880 a^6 b \log (b+a \cos (c+d x))-13440 a^4 b^3 \log (b+a \cos (c+d x))-18240 a^2 b^5 \log (b+a \cos (c+d x))+40320 b^7 \log (b+a \cos (c+d x))+5 a^2 b \cos (2 (c+d x)) \left (-407 a^4+3888 a^2 b^2-4800 b^4+192 \left (3 a^4-20 a^2 b^2+21 b^4\right ) \log (b+a \cos (c+d x))\right )-10 a \cos (c+d x) \left (85 a^6-1728 a^4 b^2+1584 a^2 b^4+1536 b^6-384 b^2 \left (3 a^4-20 a^2 b^2+21 b^4\right ) \log (b+a \cos (c+d x))\right )}{1920 a^8 d (b+a \cos (c+d x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 239, normalized size = 1.00 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 234, normalized size = 0.98 \begin {gather*} \frac {\frac {30 \, {\left (5 \, a^{4} b^{3} - 18 \, a^{2} b^{5} + 13 \, b^{7} + 2 \, {\left (3 \, a^{5} b^{2} - 10 \, a^{3} b^{4} + 7 \, a b^{6}\right )} \cos \left (d x + c\right )\right )}}{a^{10} \cos \left (d x + c\right )^{2} + 2 \, a^{9} b \cos \left (d x + c\right ) + a^{8} b^{2}} - \frac {12 \, a^{4} \cos \left (d x + c\right )^{5} - 45 \, a^{3} b \cos \left (d x + c\right )^{4} - 40 \, {\left (a^{4} - 3 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )^{3} + 60 \, {\left (3 \, a^{3} b - 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{2} + 60 \, {\left (a^{4} - 12 \, a^{2} b^{2} + 15 \, b^{4}\right )} \cos \left (d x + c\right )}{a^{7}} + \frac {60 \, {\left (3 \, a^{4} b - 20 \, a^{2} b^{3} + 21 \, b^{5}\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{a^{8}}}{60 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.99, size = 331, normalized size = 1.38 \begin {gather*} -\frac {96 \, a^{7} \cos \left (d x + c\right )^{7} - 168 \, a^{6} b \cos \left (d x + c\right )^{6} - 1785 \, a^{4} b^{3} + 5520 \, a^{2} b^{5} - 3120 \, b^{7} - 16 \, {\left (20 \, a^{7} - 21 \, a^{5} b^{2}\right )} \cos \left (d x + c\right )^{5} + 40 \, {\left (20 \, a^{6} b - 21 \, a^{4} b^{3}\right )} \cos \left (d x + c\right )^{4} + 160 \, {\left (3 \, a^{7} - 20 \, a^{5} b^{2} + 21 \, a^{3} b^{4}\right )} \cos \left (d x + c\right )^{3} + 15 \, {\left (25 \, a^{6} b - 592 \, a^{4} b^{3} + 800 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{2} - 30 \, {\left (71 \, a^{5} b^{2} - 48 \, a^{3} b^{4} - 128 \, a b^{6}\right )} \cos \left (d x + c\right ) - 480 \, {\left (3 \, a^{4} b^{3} - 20 \, a^{2} b^{5} + 21 \, b^{7} + {\left (3 \, a^{6} b - 20 \, a^{4} b^{3} + 21 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (3 \, a^{5} b^{2} - 20 \, a^{3} b^{4} + 21 \, a b^{6}\right )} \cos \left (d x + c\right )\right )} \log \left (a \cos \left (d x + c\right ) + b\right )}{480 \, {\left (a^{10} d \cos \left (d x + c\right )^{2} + 2 \, a^{9} b d \cos \left (d x + c\right ) + a^{8} b^{2} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1337 vs.
\(2 (231) = 462\).
time = 0.56, size = 1337, normalized size = 5.59 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.11, size = 315, normalized size = 1.32 \begin {gather*} \frac {{\cos \left (c+d\,x\right )}^3\,\left (\frac {2}{3\,a^3}-\frac {2\,b^2}{a^5}\right )}{d}-\frac {{\cos \left (c+d\,x\right )}^2\,\left (\frac {4\,b^3}{a^6}+\frac {3\,b\,\left (\frac {2}{a^3}-\frac {6\,b^2}{a^5}\right )}{2\,a}\right )}{d}+\frac {\cos \left (c+d\,x\right )\,\left (3\,a^4\,b^2-10\,a^2\,b^4+7\,b^6\right )+\frac {5\,a^4\,b^3-18\,a^2\,b^5+13\,b^7}{2\,a}}{d\,\left (a^9\,{\cos \left (c+d\,x\right )}^2+2\,a^8\,b\,\cos \left (c+d\,x\right )+a^7\,b^2\right )}-\frac {\cos \left (c+d\,x\right )\,\left (\frac {1}{a^3}+\frac {3\,b^4}{a^7}+\frac {3\,b^2\,\left (\frac {2}{a^3}-\frac {6\,b^2}{a^5}\right )}{a^2}-\frac {3\,b\,\left (\frac {8\,b^3}{a^6}+\frac {3\,b\,\left (\frac {2}{a^3}-\frac {6\,b^2}{a^5}\right )}{a}\right )}{a}\right )}{d}-\frac {{\cos \left (c+d\,x\right )}^5}{5\,a^3\,d}+\frac {3\,b\,{\cos \left (c+d\,x\right )}^4}{4\,a^4\,d}+\frac {\ln \left (b+a\,\cos \left (c+d\,x\right )\right )\,\left (3\,a^4\,b-20\,a^2\,b^3+21\,b^5\right )}{a^8\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________